<div ng-controller="DataCenterEventCtrl">
  <div class="row-fluid">
    <div class="span10">
      <button class="btn btn-danger btn-mini" ng-click="do_delete()">删除</button>
    </div>
    <div class="span2">
      <span>每页显示</span>
      <select class="input-mini" ng-model="page_size" ng-options="pz for pz in page_sizes" ng-change="change(page_size)">
      </select>
      <span>条</span>
    </div>
  </div>
  <table class="table table-striped table-bordered table-condensed">
    <thead>
      <tr>
        <th><input type="checkbox" ng-model="selected_all" /></th>
        <th>名称</th>
        <th>发生时间</th>
        <th>结束时间</th>
        <th>描述</th>
        <th>可能引发的原因</th>
        <th>状态</th>
      </tr>
    </thead>
    <tbody>
      <tr selectable="event" ng-repeat="event in events">
        <td><input type="checkbox" value="{{event.id}}" ng-model="selected[event.id]"/></td>
        <td>{{event.name}}</td>
        <td>{{event.start_time | date:'yyyy-MM-dd HH:mm:ss'}}</td>
        <td>{{event.end_time | date:'yyyy-MM-dd HH:mm:ss'}}</td>
        <td>{{event.desc}}</td>
        <td>{{event.reason}}</td>
        <td>
          <span>{{event.status}}</span>
        </td>
      </tr>
    </tbody>
  </table>
  <div class="pagination">
    <ul>
      <li ng-hide="should_hide()" ng-class="prev_class" ng-click="prev()"><a href="javascript:void(0);">上一页</a></li>
      <li ng-repeat="i in [] | range:page_count()" ng-hide="should_hide()" ng-click="page(i)" ng-class="(i == current_page) && 'active'">
        <a href="javascript:void(0)">{{i + 1}}</a>
      </li>
      <li ng-hide="should_hide()" ng-class="next_class" ng-click="next()"><a href="javascript:void(0);">下一页</a></li>
    </ul>
  </div>
</div>